:: [a] -> [a] -> Bool package:rio

The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.
>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False
The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.
>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
>>> isInfixOf "Haskell" "I really like Haskell."
True
>>> isInfixOf "Ial" "I really like Haskell."
False
The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to elem x (subsequences y).

Examples

>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True

>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True

>>> isSubsequenceOf [1..10] [10,9..0]
False
O(n) Check if two vectors are equal. All Vector instances are also instances of Eq and it is usually more appropriate to use those. This function is primarily intended for implementing Eq instances for new vector types.